﻿﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Xml.Serialization;
using Fcdbas.Core;
using Fcdbas.Core.Configuration;
using Fcdbas.Core.DataAccess;


namespace Fcdbas.Biz
{
    /// <summary></summary>
    [Serializable]
    [DataObject]
    [Description("")]
    [BindTable("fnd_exp_navigator", Description = "", ConnName = "", DbType = DatabaseType.MySql)]
    public class fnd_exp_navigator : Entity<fnd_exp_navigator>,Ifnd_exp_navigator
    {
        #region 属性
 
        private String _nav_key;

        /// <summary>FLAGS=KMI-L^DATATYPE=STRING(50)^PROMPT=Key^</summary>
        [DisplayName("Key")]
        [Description("FLAGS=KMI-L^DATATYPE=STRING(50)^PROMPT=Key^")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(1, "nav_key",  null, "varchar(50)", 0, 0, false)]

        public virtual String nav_key

        {
            get { return _nav_key; }
            set { if (OnPropertyChanging(__.nav_key, value)) { _nav_key = value; OnPropertyChanged(__.nav_key); } }
        }

 
        private String _key_type;

        /// <summary>FLAGS=KMI--^DATATYPE=STRING(50)^PROMPT=Key Type^</summary>
        [DisplayName("Type")]
        [Description("FLAGS=KMI--^DATATYPE=STRING(50)^PROMPT=Key Type^")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(2, "key_type",  null, "varchar(50)", 0, 0, false)]

        public virtual String key_type

        {
            get { return _key_type; }
            set { if (OnPropertyChanging(__.key_type, value)) { _key_type = value; OnPropertyChanged(__.key_type); } }
        }

 
        private Int32? _ordinal;

        /// <summary>FLAGS=KMI--^DATATYPE=NUMBER^PROMPT=Ordinal^</summary>
        [DisplayName("Ordinal")]
        [Description("FLAGS=KMI--^DATATYPE=NUMBER^PROMPT=Ordinal^")]
        [DataObjectField(false, false, false, 10)]
        [BindColumn(3, "ordinal",  null, "int(11)", 10, 0, false)]

        public virtual Int32? ordinal

        {
            get { return _ordinal; }
            set { if (OnPropertyChanging(__.ordinal, value)) { _ordinal = value; OnPropertyChanged(__.ordinal); } }
        }

 
        private String _nav_name;

        /// <summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Name^</summary>
        [DisplayName("Name")]
        [Description("FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Name^")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn(4, "nav_name",  null, "varchar(50)", 0, 0, false)]

        public virtual String nav_name

        {
            get { return _nav_name; }
            set { if (OnPropertyChanging(__.nav_name, value)) { _nav_name = value; OnPropertyChanged(__.nav_name); } }
        }

 
        private String _pres_object;

        /// <summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Pres Object^</summary>
        [DisplayName("Pres_Object")]
        [Description("FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Pres Object^")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn(5, "pres_object",  null, "varchar(50)", 0, 0, false)]

        public virtual String pres_object

        {
            get { return _pres_object; }
            set { if (OnPropertyChanging(__.pres_object, value)) { _pres_object = value; OnPropertyChanged(__.pres_object); } }
        }

 
        private String _nav_type;

        /// <summary>FLAGS=A-IU-^DATATYPE=STRING(25)^PROMPT=Type^</summary>
        [DisplayName("Type1")]
        [Description("FLAGS=A-IU-^DATATYPE=STRING(25)^PROMPT=Type^")]
        [DataObjectField(false, false, true, 25)]
        [BindColumn(6, "nav_type",  null, "varchar(25)", 0, 0, false)]

        public virtual String nav_type

        {
            get { return _nav_type; }
            set { if (OnPropertyChanging(__.nav_type, value)) { _nav_type = value; OnPropertyChanged(__.nav_type); } }
        }

 
        private String _parent_key;

        /// <summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Parent Key^</summary>
        [DisplayName("Key1")]
        [Description("FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Parent Key^")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn(7, "parent_key",  null, "varchar(50)", 0, 0, false)]

        public virtual String parent_key

        {
            get { return _parent_key; }
            set { if (OnPropertyChanging(__.parent_key, value)) { _parent_key = value; OnPropertyChanged(__.parent_key); } }
        }

 
        private String _win_text;

        /// <summary>FLAGS=A-IU-^DATATYPE=STRING(200)^PROMPT=Win Text^</summary>
        [DisplayName("Text")]
        [Description("FLAGS=A-IU-^DATATYPE=STRING(200)^PROMPT=Win Text^")]
        [DataObjectField(false, false, true, 200)]
        [BindColumn(8, "win_text",  null, "varchar(200)", 0, 0, false)]

        public virtual String win_text

        {
            get { return _win_text; }
            set { if (OnPropertyChanging(__.win_text, value)) { _win_text = value; OnPropertyChanged(__.win_text); } }
        }

 
        private String _assembly_dll;

        /// <summary></summary>
        [DisplayName("Dll")]
        [Description("")]
        [DataObjectField(false, false, true, 200)]
        [BindColumn(9, "assembly_dll",  null, "varchar(200)", 0, 0, false)]

        public virtual String assembly_dll

        {
            get { return _assembly_dll; }
            set { if (OnPropertyChanging(__.assembly_dll, value)) { _assembly_dll = value; OnPropertyChanged(__.assembly_dll); } }
        }

 
        private String _navi_class;

        /// <summary></summary>
        [DisplayName("Navi_Class")]
        [Description("")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(10, "navi_class",  null, "varchar(50)", 0, 0, false)]

        public virtual String navi_class

        {
            get { return _navi_class; }
            set { if (OnPropertyChanging(__.navi_class, value)) { _navi_class = value; OnPropertyChanged(__.navi_class); } }
        }

 
        private String _objid;

        /// <summary></summary>
        [DisplayName("Objid")]
        [Description("")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(11, "objid",  null, "varchar(50)", 0, 0, false)]

        public virtual String objid

        {
            get { return _objid; }
            set { if (OnPropertyChanging(__.objid, value)) { _objid = value; OnPropertyChanged(__.objid); } }
        }

 
        private String _objversion;

        /// <summary></summary>
        [DisplayName("Objversion")]
        [Description("")]
        [DataObjectField(false, false, true, 24)]
        [BindColumn(12, "objversion",  null, "varchar(24)", 0, 0, false)]

        public virtual String objversion

        {
            get { return _objversion; }
            set { if (OnPropertyChanging(__.objversion, value)) { _objversion = value; OnPropertyChanged(__.objversion); } }
        }
        #endregion

        #region 获取/设置 字段值
        /// <summary>
        /// 获取/设置 字段值。
        /// 一个索引，基类使用反射实现。
        /// 派生实体类可重写该索引，以避免反射带来的性能损耗
        /// </summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        public override Object this[String name]
        {
            get
            {
                switch (name)
                {
                    case __.nav_key : return _nav_key;
                    case __.key_type : return _key_type;
                    case __.ordinal : return _ordinal;
                    case __.nav_name : return _nav_name;
                    case __.pres_object : return _pres_object;
                    case __.nav_type : return _nav_type;
                    case __.parent_key : return _parent_key;
                    case __.win_text : return _win_text;
                    case __.assembly_dll : return _assembly_dll;
                    case __.navi_class : return _navi_class;
                    case __.objid : return _objid;
                    case __.objversion : return _objversion;
                    default: return base[name];
                }
            }
            set
            {
                switch (name)
                {
                    case __.nav_key : 
                        if(value != null)
                            _nav_key = Convert.ToString(value);
                        else
                            _nav_key = null;
                    break;
                    case __.key_type : 
                        if(value != null)
                            _key_type = Convert.ToString(value);
                        else
                            _key_type = null;
                    break;
                    case __.ordinal : 
                        if(value != null)
                            _ordinal = Convert.ToInt32(value);
                        else
                            _ordinal = null;
                    break;
                    case __.nav_name : 
                        if(value != null)
                            _nav_name = Convert.ToString(value);
                        else
                            _nav_name = null;
                    break;
                    case __.pres_object : 
                        if(value != null)
                            _pres_object = Convert.ToString(value);
                        else
                            _pres_object = null;
                    break;
                    case __.nav_type : 
                        if(value != null)
                            _nav_type = Convert.ToString(value);
                        else
                            _nav_type = null;
                    break;
                    case __.parent_key : 
                        if(value != null)
                            _parent_key = Convert.ToString(value);
                        else
                            _parent_key = null;
                    break;
                    case __.win_text : 
                        if(value != null)
                            _win_text = Convert.ToString(value);
                        else
                            _win_text = null;
                    break;
                    case __.assembly_dll : 
                        if(value != null)
                            _assembly_dll = Convert.ToString(value);
                        else
                            _assembly_dll = null;
                    break;
                    case __.navi_class : 
                        if(value != null)
                            _navi_class = Convert.ToString(value);
                        else
                            _navi_class = null;
                    break;
                    case __.objid : 
                        if(value != null)
                            _objid = Convert.ToString(value);
                        else
                            _objid = null;
                    break;
                    case __.objversion : 
                        if(value != null)
                            _objversion = Convert.ToString(value);
                        else
                            _objversion = null;
                    break;
                    default: base[name] = value; break;
                }
            }
        }
        #endregion

        #region 字段名
        /// <summary>取得字段信息的快捷方式</summary>
        public class _
        {
            ///<summary>FLAGS=KMI-L^DATATYPE=STRING(50)^PROMPT=Key^</summary>
            public static readonly Field nav_key = FindByName(__.nav_key);

            ///<summary>FLAGS=KMI--^DATATYPE=STRING(50)^PROMPT=Key Type^</summary>
            public static readonly Field key_type = FindByName(__.key_type);

            ///<summary>FLAGS=KMI--^DATATYPE=NUMBER^PROMPT=Ordinal^</summary>
            public static readonly Field ordinal = FindByName(__.ordinal);

            ///<summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Name^</summary>
            public static readonly Field nav_name = FindByName(__.nav_name);

            ///<summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Pres Object^</summary>
            public static readonly Field pres_object = FindByName(__.pres_object);

            ///<summary>FLAGS=A-IU-^DATATYPE=STRING(25)^PROMPT=Type^</summary>
            public static readonly Field nav_type = FindByName(__.nav_type);

            ///<summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Parent Key^</summary>
            public static readonly Field parent_key = FindByName(__.parent_key);

            ///<summary>FLAGS=A-IU-^DATATYPE=STRING(200)^PROMPT=Win Text^</summary>
            public static readonly Field win_text = FindByName(__.win_text);

            ///<summary></summary>
            public static readonly Field assembly_dll = FindByName(__.assembly_dll);

            ///<summary></summary>
            public static readonly Field navi_class = FindByName(__.navi_class);

            ///<summary></summary>
            public static readonly Field objid = FindByName(__.objid);

            ///<summary></summary>
            public static readonly Field objversion = FindByName(__.objversion);

            static Field FindByName(String name) { return Meta.Table.FindByName(name); }
        }

        /// <summary>取得字段名称的快捷方式</summary>
        class __
        {
            ///<summary>FLAGS=KMI-L^DATATYPE=STRING(50)^PROMPT=Key^</summary>
            public const String nav_key = "nav_key";

            ///<summary>FLAGS=KMI--^DATATYPE=STRING(50)^PROMPT=Key Type^</summary>
            public const String key_type = "key_type";

            ///<summary>FLAGS=KMI--^DATATYPE=NUMBER^PROMPT=Ordinal^</summary>
            public const String ordinal = "ordinal";

            ///<summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Name^</summary>
            public const String nav_name = "nav_name";

            ///<summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Pres Object^</summary>
            public const String pres_object = "pres_object";

            ///<summary>FLAGS=A-IU-^DATATYPE=STRING(25)^PROMPT=Type^</summary>
            public const String nav_type = "nav_type";

            ///<summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Parent Key^</summary>
            public const String parent_key = "parent_key";

            ///<summary>FLAGS=A-IU-^DATATYPE=STRING(200)^PROMPT=Win Text^</summary>
            public const String win_text = "win_text";

            ///<summary></summary>
            public const String assembly_dll = "assembly_dll";

            ///<summary></summary>
            public const String navi_class = "navi_class";

            ///<summary></summary>
            public const String objid = "objid";

            ///<summary></summary>
            public const String objversion = "objversion";

        }
        #endregion
    }

    /// <summary>接口</summary>
    public partial interface Ifnd_exp_navigator
    {
       #region 属性
        /// <summary>FLAGS=KMI-L^DATATYPE=STRING(50)^PROMPT=Key^</summary>

        String nav_key { get; set; }


        /// <summary>FLAGS=KMI--^DATATYPE=STRING(50)^PROMPT=Key Type^</summary>

        String key_type { get; set; }


        /// <summary>FLAGS=KMI--^DATATYPE=NUMBER^PROMPT=Ordinal^</summary>

        Int32? ordinal { get; set; }


        /// <summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Name^</summary>

        String nav_name { get; set; }


        /// <summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Pres Object^</summary>

        String pres_object { get; set; }


        /// <summary>FLAGS=A-IU-^DATATYPE=STRING(25)^PROMPT=Type^</summary>

        String nav_type { get; set; }


        /// <summary>FLAGS=A-IU-^DATATYPE=STRING(50)^PROMPT=Parent Key^</summary>

        String parent_key { get; set; }


        /// <summary>FLAGS=A-IU-^DATATYPE=STRING(200)^PROMPT=Win Text^</summary>

        String win_text { get; set; }


        /// <summary></summary>

        String assembly_dll { get; set; }


        /// <summary></summary>

        String navi_class { get; set; }


        /// <summary></summary>

        String objid { get; set; }


        /// <summary></summary>

        String objversion { get; set; }

        #endregion

        #region 获取/设置 字段值
        /// <summary>获取/设置 字段值。</summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        Object this[String name] { get; set; }
        #endregion
    }
}